﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace school
{
    public partial class mandesktop : Form
    {
        public mandesktop()
        {
            InitializeComponent();
        }

        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            //最初最初欢迎页面
            aboutSystem f0 = new aboutSystem();
            f0.TopLevel = false;
            f0.FormBorderStyle = FormBorderStyle.None;
            f0.WindowState = FormWindowState.Maximized;

            panel1.Controls.Add(f0);
            f0.Show();
            switch (this.treeView1.SelectedNode.Text)
            {
                case "添加管理员":
                    treeselect_textBox.Text = "添加管理员";
                    addmanager f1 = new addmanager();
                    f1.TopLevel = false;
                    f1.FormBorderStyle = FormBorderStyle.None;
                    f1.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f1);
                    f1.Show();
                    break;

                case "修改管理员信息":
                    treeselect_textBox.Text = "修改管理员信息";
                    manshowmanagerinformation f2 = new manshowmanagerinformation();
                    f2.TopLevel = false;
                    f2.FormBorderStyle = FormBorderStyle.None;
                    f2.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f2);
                    f2.Show();
                    break;

                case "删除管理员":
                    treeselect_textBox.Text = "删除管理员";
                    mandelectmaninformation f3 = new mandelectmaninformation();
                    f3.TopLevel = false;
                    f3.FormBorderStyle = FormBorderStyle.None;
                    f3.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f3);
                    f3.Show();
                    break;

                case "添加学生信息":
                    treeselect_textBox.Text = "添加学生信息";
                    addstuinformation f4 = new addstuinformation();
                    f4.TopLevel = false;
                    f4.FormBorderStyle = FormBorderStyle.None;
                    f4.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f4);
                    f4.Show();
                    break;

                case "修改学生信息":
                    treeselect_textBox.Text = "修改学生信息";
                    manshowstuinformation f5 = new manshowstuinformation();
                    f5.TopLevel = false;
                    f5.FormBorderStyle = FormBorderStyle.None;
                    f5.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f5);
                    f5.Show();
                    break;

                case "退出系统":
                    Application.Exit();
                    break;

                case "删除学生信息":
                    treeselect_textBox.Text = "删除学生信息";
                    mandelectstuinformation f6 = new mandelectstuinformation();
                    f6.TopLevel = false;
                    f6.FormBorderStyle = FormBorderStyle.None;
                    f6.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f6);
                    f6.Show();
                    break;


                case "开设课程":
                    treeselect_textBox.Text = "开设课程";
                    opensource f7 = new opensource();
                    f7.TopLevel = false;
                    f7.FormBorderStyle = FormBorderStyle.None;
                    f7.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f7);
                    f7.Show();
                    break;

                case "查询课程":
                    treeselect_textBox.Text = "查询课程";
                    aboutsource f8 = new aboutsource();
                    f8.TopLevel = false;
                    f8.FormBorderStyle = FormBorderStyle.None;
                    f8.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f8);
                    f8.Show();
                    break;

                case "录入成绩":
                    treeselect_textBox.Text = "录入成绩";
                    manentercoursegrades f9 = new manentercoursegrades();
                    f9.TopLevel = false;
                    f9.FormBorderStyle = FormBorderStyle.None;
                    f9.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f9);
                    f9.Show();
                    break;

                case "统计成绩":
                    treeselect_textBox.Text = "统计成绩";
                    manstucoursegradeanalysis f10 = new manstucoursegradeanalysis();
                    f10.TopLevel = false;
                    f10.FormBorderStyle = FormBorderStyle.None;
                    f10.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f10);
                    f10.Show();
                    break;

                case "修改成绩":
                    treeselect_textBox.Text = "修改成绩";
                    manchangestuclassgrades f11 = new manchangestuclassgrades();
                    f11.TopLevel = false;
                    f11.FormBorderStyle = FormBorderStyle.None;
                    f11.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f11);
                    f11.Show();
                    break;

                case "修改个人密码":
                    treeselect_textBox.Text = "修改个人密码";
                    manchangepassword f12 = new manchangepassword();
                    f12.TopLevel = false;
                    f12.FormBorderStyle = FormBorderStyle.None;
                    f12.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f12);
                    f12.Show();
                    break;
            }
        }
    }
}
